import sys

if len(sys.argv) > 1:
    filename = sys.argv[1]
    file = open (filename)
    data = file.read()
    file.close()

    result = "CompilationTarget=\""
    if "] Error " in data:
        result = result + str(-1)           
    else:
        result = result + str(data.count(": warning: ")) 
        
            
    result = result + "\""
    print result
else:
    print "Usage:"
    print "> convertor_vx653 <filename>"
    print
    print "Example:"
    print "> convertor_vx653 my_compilation_output.txt"
